﻿Public Class Resource
    Implements IObject

    Private id As Integer
    Private firstname As String
    Private surname As String
    Private documentType As Integer
    Private documentNumber As Integer
    Private email As String
    Private createDate As Date
    Private endDate As Date
    Private hourCost As Double

    Public Sub New()
    End Sub

    Public Sub New(ByVal id As Integer)
        Me.id = id
    End Sub

    Public Sub New(ByVal id As Integer, ByVal firstname As String, ByVal surname As String, ByVal documentType As Integer, ByVal documentNumber As Integer, ByVal email As String, ByVal createDate As Date, ByVal endDate As Date, ByVal hourCost As Double)
        Me.id = id
        Me.firstname = firstname
        Me.surname = surname
        Me.documentType = documentType
        Me.documentNumber = documentNumber
        Me.email = email
        Me.createDate = createDate
        Me.endDate = endDate
        Me.hourCost = hourCost
    End Sub

    Public Property idProperty() As Integer
        Get
            Return Me.id
        End Get
        Set(ByVal value As Integer)
            Me.id = value
        End Set
    End Property

    Public Property firstnameProperty() As String
        Get
            Return Me.firstname
        End Get
        Set(ByVal value As String)
            Me.firstname = value
        End Set
    End Property

    Public Property surnameProperty() As String
        Get
            Return Me.surname
        End Get
        Set(ByVal value As String)
            Me.surname = value
        End Set
    End Property

    Public Property documentTypeProperty() As Integer
        Get
            Return Me.documentType
        End Get
        Set(ByVal value As Integer)
            Me.documentType = value
        End Set
    End Property

    Public Property documentNumberProperty() As Integer
        Get
            Return Me.documentNumber
        End Get
        Set(ByVal value As Integer)
            Me.documentNumber = value
        End Set
    End Property

    Public Property emailProperty() As String
        Get
            Return Me.email
        End Get
        Set(ByVal value As String)
            Me.email = value
        End Set
    End Property

    Public Property createDateProperty() As Date
        Get
            Return Me.createDate
        End Get
        Set(ByVal value As Date)
            Me.createDate = value
        End Set
    End Property

    Public Property endDateProperty() As Date
        Get
            Return Me.endDate
        End Get
        Set(ByVal value As Date)
            Me.endDate = value
        End Set
    End Property

    Public Property hourCostProperty() As Double
        Get
            Return Me.hourCost
        End Get
        Set(ByVal value As Double)
            Me.hourCost = value
        End Set
    End Property

    Public Function getTableName() As String Implements IObject.getTableName
        Return "RESOURCES"
    End Function

    Public Function getId() As Integer Implements IObject.getId
        Return id
    End Function


End Class
